package org.kl.bf.repository.basic;

import java.util.List;

import org.kl.bf.entity.basic.Menu;
import org.kl.bf.repository.BasicRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface MenuDao extends BasicRepository<Menu, String>, JpaSpecificationExecutor<Menu> {
	List<Menu> findByRootIdOrderByDisplayOrderAsc(String rootId);

	List<Menu> findByMenuUrl(String menuUrl);

	List<Menu> findByMenuParentIdOrderByDisplayOrderAsc(String menuParentId);

	/**
	 * 查询所有根菜单【父菜单为空】
	 * 
	 * @return
	 */
	List<Menu> findByMenuParentIdIsNullOrderByDisplayOrderAsc();
}
